package com.tsingtree.modular.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 弹窗广告主表
 * </p>
 *
 * @author jagger
 * @since 2025-10-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="NanPopupAdvert对象", description="弹窗广告主表")
@TableName("nan_popup_advert")
public class NanPopupAdvert implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    @ApiModelProperty(value = "广告名称")
    private String name;

    @ApiModelProperty(value = "广告类型：1-绑定设备后弹窗，2-即时弹窗，3-评论弹窗，4-注册时长")
    private Integer type;

    @ApiModelProperty(value = "设备ID（关联 nan_seller_device.code）")
    private String deviceId;

    @ApiModelProperty(value = "状态：0-禁用，1-启用")
    private Integer status;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "延迟时间（小时），类型3-评论弹窗延迟时间，类型4-注册时长")
    private BigDecimal delayHours;

    @ApiModelProperty(value = "链接类型：1-内链，2-外链，仅类型3使用")
    private Integer linkType;

    @ApiModelProperty(value = "链接地址，仅类型3使用")
    private String linkUrl;

    @ApiModelProperty(value = "是否删除：0-正常，1-删除")
    private Boolean isDel;

    @ApiModelProperty(value = "设备名称（非数据库字段）")
    @TableField(exist = false)
    private String deviceName;

}

